package com.wyvoid.forum.service.impl;

import com.wyvoid.forum.service.IFriendService;
import com.wyvoid.forum.dao.IFriendDAO;
import com.wyvoid.forum.domain.Friend;
import com.wyvoid.core.persistent.hibernate.HibernatePage;
import com.wyvoid.core.persistent.Pagination;

/**
 * Created by IntelliJ IDEA.
 * User: wangchao
 * Date: 2007-6-29
 * Time: 22:28:07
 * To change this template use File | Settings | File Templates.
 */
public class FriendService implements IFriendService {
    private IFriendDAO friendDAO;


    public IFriendDAO getFriendDAO() {
        return friendDAO;
    }

    public void setFriendDAO(IFriendDAO friendDAO) {
        this.friendDAO = friendDAO;
    }

    public void createFriend(Friend friend) {
        friendDAO.create(friend);
    }

    public Friend getFriendByFriendUserId(long friendUserId) {
        return friendDAO.getFriendByFriendUserId(friendUserId);
    }

    public HibernatePage getFriendsByUserId(long userId, Pagination pagination) {
        return friendDAO.getFriendsByUserId(userId,pagination);
    }
}
